<%@page import="com.xmlt.core.template.Template"%>
<%@page import="java.util.Map"%>
<%@page import="com.xmlt.core.template.TemplateManager"%>
<%@page import="com.xmlt.ui.server.ServerUtils"%>
<%@page import="com.xmlt.ui.server.EditorContext"%>
<%@ page language="java" contentType="text/xml; charset=UTF-8"
    pageEncoding="UTF-8"%>
<%

String contextId = pageContext.getRequest().getParameter(EditorContext.EDITOR_CONTEXT_ID_PARAM);
EditorContext eContext = ServerUtils.getEditorContext(contextId);
TemplateManager manager = eContext.getTemplateManager();
Map<String, Template> templates = manager.getAllTemplates();
%>
<templates>
<%
for(String ref: templates.keySet()) {
%>
	<template ref="<%= ref%>"></template>
<%
}
%>
</templates>